package com.guchenbo.study.mvc.servlet31.springmvc;

import com.guchenbo.study.mvc.servlet31.springmvc.servlet.NoMvcServlet;
import org.springframework.web.WebApplicationInitializer;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;

public class NoMvcServletInitializer implements WebApplicationInitializer {
    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        ServletRegistration.Dynamic registration = servletContext.addServlet("noMvcServlet", NoMvcServlet.class);
        registration.setLoadOnStartup(1);
        registration.addMapping("/nomvc/*");
    }
}
